CC=gcc
CFLAGS= -Wall -g -I.
LDFLAGS=
TARGET=test
SOURCES=test.c mystdio.c

OBJECTS=$(patsubst %.c,%.o,$(SOURCES))

$(TARGET):$(OBJECTS)
	$(CC) $(OBJECTS) $(LDFLAGS) -o $(TARGET)

%.o: %.c
	$(CC) $(CFLAGS) -c  $< -o $@
.PHONY:clean
clean:
	rm -f $(TARGET) $(OBJECTS)

